package com.dxysun.design.proxy;

public class Proxy implements ISubject
{

	private ISubject subject;

	public Proxy(ISubject subject)
	{
		this.subject = subject;
	}

	@Override
	public void request()
	{
		before();
		subject.request();
		after();
	}

	private void after()
	{
		System.out.println("call service after");
	}

	private void before()
	{
		System.out.println("call service before");
	}
}
